/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f5f7fa;
}

/* 登录容器 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('https://bpic.588ku.com/back_pic/05/99/93/665f856ee827e8b.jpg');
    background-size: cover;
    /* 等比例缩放覆盖整个容器，可能裁剪 */
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
}

/* 登录框 */
.login-box {
    background-color: rgba(255, 255, 255, 0.5);
    /* 白色背景，50% 透明 */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
}

/* 登录标题 */
.login-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    position: relative;
}

.login-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 10px auto 0;
    border-radius: 3px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error {
    border-color: #e74c3c;
}

/* 错误信息 */
.error-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

/* 通用错误信息 */
.common-error-message {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    background-color: #f8d7da;
    border-radius: 8px;
}

/* 验证码容器 */
.captcha-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.captcha-container input {
    flex: 1;
}

/* 验证码按钮 */
.captcha-button {
    padding: 12px 15px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.captcha-button:hover:not(:disabled) {
    background: linear-gradient(90deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.captcha-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 验证码显示区域 */
.captcha-display {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
}

.captcha-code {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 5px;
    color: #333;
    font-family: 'Courier New', monospace;
}

/* 登录按钮 */
.login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-button:hover:not(:disabled) {
    background: linear-gradient(90deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-box {
        padding: 25px;
    }

    .login-title {
        font-size: 24px;
    }

    .captcha-container {
        flex-direction: column;
    }

    .captcha-container input,
    .captcha-button {
        width: 100%;
    }
}

.Home_q1 {
    padding-top: 20px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.Home_q1:hover {
    color: #667eea;
}











/* 动画效果 */
.animate__fadeIn {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录按钮悬停效果 */
.login-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-button:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 加载动画 */
.login-button.loading {
    color: transparent;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 验证码按钮动画 */
.captcha-button {
    transition: all 0.2s ease;
}

.captcha-button:not(:disabled):hover {
    transform: scale(1.03);
}

.captcha-button:not(:disabled):active {
    transform: scale(0.98);
}

/* 错误消息动画 */
.common-error-message {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.common-error-message.animate__fadeIn {
    opacity: 1;
}

/* 注册链接悬停效果 */
.Home_q1.hover-effect {
    transition: all 0.2s ease;
    cursor: pointer;
}

.Home_q1.hover-effect:hover {
    color: #1890ff;
    text-decoration: underline;
}

/* 输入框焦点效果 */
.form-group input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    transition: all 0.3s ease;
}

/* 登录框动画 */
.login-box {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 登录成功动画样式 */
.success-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.success-animation {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: successSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.success-checkmark svg {
    width: 100%;
    height: 100%;
}

.success-checkmark-circle {
    fill: #28a745;
    stroke: #28a745;
    stroke-width: 2;
    stroke-dasharray: 85 85;
    stroke-dashoffset: 85;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-stem {
    stroke: white;
    stroke-width: 2;
    stroke-dasharray: 40 40;
    stroke-dashoffset: 40;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.success-checkmark-kick {
    stroke: white;
    stroke-width: 2;
    stroke-dasharray: 25 25;
    stroke-dashoffset: 25;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 1s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.success-message {
    color: #333;
    font-size: 18px;
    margin: 0;
    animation: fadeInText 0.5s ease-out 1.2s forwards;
    opacity: 0;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}